<?php
/*------------------------------------------------------------------------
# com_vportfolio - Vportfolio component
# ------------------------------------------------------------------------
# author    Vsmart Extensions
# copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.vsmart-extensions.com
# Technical Support:  Forum - http://www.vsmart-extensions.com
-------------------------------------------------------------------------*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.helper');

require_once(JPATH_COMPONENT.DS.'controller.php');
require_once(JPATH_SITE.DS.'administrator/components/com_vportfolio/admin.vst_functions.php');
require_once(JPATH_SITE.DS.'administrator/components/com_vportfolio/models/config.php');



// Create the controller
$controller = new PortfolioController();

$task = JRequest::getVar('task', null, 'default', 'cmd');

if($task == "saveReview") $controller->registerTask("saveReview","saveReview");
if($task == "rate") $controller->registerTask("rate","rateItem");

// Perform the Request task
$controller->execute(JRequest::getVar('task', null, 'default', 'cmd'));


// Redirect if set by the controller
$controller->redirect();

$controller->printFooter();